Move flushing code to non-implicit-paint only call.
authorAlexander Larsson <alexl@redhat.com>
Tue, 9 Dec 2008 11:26:01 +0000 (12:26 +0100)
committerAlexander Larsson <alex@localhost.localdomain>
Thu, 2 Apr 2009 08:14:08 +0000 (10:14 +0200)
This is in preparation for other types of buffering

gdk/gdkwindow.c

index 391079d175ed6263870c24614ce5d1490361f452..750ea1e1305d3e5bf79667405df746c3dd35a912 100644 (file)
@@ -2201,6 +2201,15 @@ gdk_window_free_paint_stack (GdkWindow *window)
     }
 }
 
+/* Flushes all outstanding changes to the window, call this
+ * before drawing directly to the window (i.e. outside a begin/end_paint pair).
+ */
+static void
+gdk_window_flush (GdkWindow *window)
+{
+  gdk_window_flush_implicit_paint (window);
+}
+
 static void
 gdk_window_get_offsets (GdkWindow *window,
                        gint      *x_offset,
@@ -2345,7 +2354,7 @@ setup_clip_for_paint (GdkDrawable *drawable,
 
 
 #define SETUP_DIRECT_GC_CLIP(gc)                            \
-      gdk_window_flush_implicit_paint ((GdkWindow *)drawable);\
+      gdk_window_flush ((GdkWindow *)drawable);\
       setup_clip_for_draw (drawable, gc, old_clip_x, old_clip_y);
 
 #define RESTORE_DIRECT_GC_CLIP(gc)
@@ -3683,7 +3692,7 @@ gdk_window_ref_cairo_surface (GdkDrawable *drawable)
     {
       
       /* This will be drawing directly to the window, so flush implicit paint */
-      gdk_window_flush_implicit_paint ((GdkWindow *)drawable);
+      gdk_window_flush ((GdkWindow *)drawable);
       
       if (!private->cairo_surface)
        {